---
category: Validator
created: '2020-04-19'
title: Check if an object is an array
updated: '2021-10-13'
---

**JavaScript version**

```js isArray.js
const isArray = (obj) => Array.isArray(obj);
```

**TypeScript version**

```ts isArray.ts
const isArray = (obj: any): boolean => Array.isArray(obj);
```
